Skip to content

feat(rules): Bundle e (convention long-tail) — 7 件 global rules 集約 (順位 23/24/25/26/30/33/70)#111

Merged
aloekun merged 2 commits intomasterfrom
feat/bundle-e-convention-rules
May 4, 2026
Merged

feat(rules): Bundle e (convention long-tail) — 7 件 global rules 集約 (順位 23/24/25/26/30/33/70)#111
aloekun merged 2 commits intomasterfrom
feat/bundle-e-convention-rules

Conversation

@aloekun
Copy link
Copy Markdown
Owner

@aloekun aloekun commented May 4, 2026

Summary

Bundle "e" (convention long-tail) を本セッションで land。順位 23/24/25/26/30/33/70 の 7 件を ~/.claude/rules/common/ 配下のグローバル rules に集約

注: グローバル rules は project repo 外 (~/.claude/rules/...) のため diff には現れません。本 PR は完了の証跡として project 側の todo cleanup + docs-pr-iteration-efficiency.md status 更新を含みます。

Bundle e 内訳

順位 反映先 内容
23 coding-style.md Markdown 節 (新設) 日付入り見出しは安定 ASCII identifier 優先、grep -rn で cross-ref 確認
24 git-workflow.md jj Operations 拡張 jj conflict リカバリ手順 (大規模は jj abandon + jj new が高速)
25 ~/.claude/CLAUDE.md Code Style 拡張 __ prefix scratch 規約 + jj auto-snapshot 特性 (PR #85 由来)
26 development-workflow.md 「背景タスクの待機方針」(新設) polling 禁止 (token 浪費防止、ADR-018 補強)
30 coding-style.md Cross-File Reference Lifecycle 拡張 Rust raw string / TOML / JSONC の 3 種 anti-pattern + raw string 編集時補助
33 code-review.md Multi-point synchronization (新設) 新 verdict 経路追加時の 3 点同期チェック (PR #95 由来)
70 同上 (33 と同節内) 設計 doc / 実装の同期チェック (PR #110 OBS-2 由来)

Bundle U / V / d 終了状態

同梱 (Bundle d 登録、PR #110 post-merge-feedback 採用案、前ターン分)

  • docs/todo5.md に 順位 68 / 69 詳細エントリ追加 (順位 70 は本 PR で land のため別途削除)
  • docs/todo.md priority table に 順位 68 / 69 追加済 (70 は本 PR で削除)

Project repo 内の変更

  • docs/todo2.md: 順位 23/24/25/26 詳細エントリ削除 (-134 lines)
  • docs/todo3.md: 順位 30/33 詳細エントリ削除 (-82 lines)
  • docs/todo5.md: 順位 70 詳細エントリ削除 (Bundle d 残の 68/69 は登録)
  • docs/todo.md: priority table から 7 行削除 + Bundle U/V/d/e 脚注更新
  • docs/docs-pr-iteration-efficiency.md: 📋 LOW IMPACT + 後回し可セクションを Bundle "e" ✅ 完了に集約

期待効果 (検証は dogfood)

Test plan

  • pre-push-review APPROVE (simplicity / security 両 facet)、findings なし
  • CodeRabbit review APPROVE
  • post-PR dogfood: 次の docs PR で convention 違反が AI/人間によって自然に回避されるか観察
  • post-PR dogfood: 順位 70 の「設計 doc / 実装の同期チェック」が次の lint rule / hook config 編集で機能するか観察

Summary by CodeRabbit

  • Documentation
    • ドキュメントとタスク一覧を整理・更新しました:いくつかのバンドルを「完了」と明記し、低影響の個別説明を削除して未着手項目を「保留中」に再分類しました。
    • 実行順序表の行番号と参照整合を調整し、未解決のテスト課題や yaml 例外に関する追記事項を追加しました。
    • 古い未決タスクや重複記述を削除して本文を簡潔化しました。

…位 23/24/25/26/30/33/70)

## Bundle e 実装

global rules (~/.claude/) は project repo 外のため diff に現れないが、本 PR 完了で全 project に即時適用される:

- 順位 23 (XS): coding-style.md Markdown 節新設 — 日付入り見出しアンカーは安定 ASCII identifier 優先、grep -rn でクロスファイル参照確認
- 順位 24 (XS): git-workflow.md jj Operations 拡張 — jj conflict リカバリ手順 (規模別の使い分け、大規模は jj abandon + jj new master + 再 edit が高速)
- 順位 25 (XS): CLAUDE.md Personal Preferences > Code Style 拡張 — __ prefix scratch 規約 + jj auto-snapshot 特性 (PR #85 事例由来)
- 順位 26 (XS): development-workflow.md 「背景タスクの待機方針」節新設 — polling 禁止 (token 浪費防止、ADR-018 補強)
- 順位 30 (XS): coding-style.md Cross-File Reference Lifecycle に具体例追記 — Rust raw string / TOML / JSONC の 3 種類 anti-pattern + raw string 編集時補助
- 順位 33 (XS): code-review.md Multi-point synchronization 節新設 — 新 verdict 経路追加時の 3 点同期チェック (PR #95 由来)
- 順位 70 (XS): code-review.md 同節内に追記 — 設計 doc / 実装の同期チェック (PR #110 OBS-2 由来、commit message に乖離理由を明記)

## 副次変更 (project repo 内)

- docs/todo2.md: 順位 23/24/25/26 詳細エントリ削除
- docs/todo3.md: 順位 30/33 詳細エントリ削除
- docs/todo5.md: 順位 70 詳細エントリ削除
- docs/todo.md: priority table から 7 行削除、Bundle U/V/d/e 脚注更新 (Bundle U/V は完全消化)
- docs/docs-pr-iteration-efficiency.md: 📋 LOW IMPACT + 後回し可セクションを Bundle "e" ✅ 完了に集約

## 同梱 (Bundle d 登録、PR #110 post-merge-feedback 採用案、前ターンで registered)

- docs/todo5.md: 順位 68/69 詳細エントリ追加 (順位 70 は本 PR で land のため別途削除)
- docs/todo.md: priority table に 順位 68/69/70 追加済み (70 は本 PR で削除に転じた)
- 残る 順位 68 (test infra) と 順位 69 (config コメント) は scope 異なるため独立 PR 推奨

## Bundle U/V/d 終了状態

- Bundle U (順位 29 = PR #110、順位 30 = 本 PR) 完全消化
- Bundle V (順位 31/32 = PR #109、順位 33 = 本 PR) 完全消化
- Bundle d (順位 70 = 本 PR、順位 68/69 残存) 部分消化

## 期待効果 (検証は dogfood)

- AI / 人間が新セッションで convention に自然に follow する (rule 自動参照)
- PR #110 で導入した no-ephemeral-todo-reference lint rule (machine 層) と本 PR の Cross-File Reference Lifecycle 具体例 (guideline 層) で二層防御
- spec-impl drift パターンが code-review.md checklist で意識化される
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: da7f83fc-57cd-4fe5-afc8-eff73a1dfb33

📥 Commits

Reviewing files that changed from the base of the PR and between 96decf1 and 37c1d81.

📒 Files selected for processing (1)
  • docs/docs-pr-iteration-efficiency.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/docs-pr-iteration-efficiency.md

📝 Walkthrough

Walkthrough

複数のドキュメントファイルに対する包括的なアップデートで、完了したバンドル(U、V、e)と対応するタスク行を削除し、Bundle e の完了状態を明記し、PR #110 関連の新規タスク(no-ephemeral-todo-reference に関する単体テストとコメント記載)を追加します。

Changes

プロジェクト追跡ドキュメントの更新

Layer / File(s) Summary
完了バンドルの整理
docs/docs-pr-iteration-efficiency.md
Bundle「e」を完了扱いに統一し、個別タスク説明を削除、codify 先(~/.claude/rules/common/... とグローバル ~/.claude/CLAUDE.md)を明記。推奨 bundle セクションに「✅ 完了」枠を追加し、順位ごとの反映先を表で明示。
タスクテーブルの同期更新
docs/todo.md, docs/todo2.md, docs/todo3.md
完了扱いの Bundle U/V/e に紐づく表行(例: 順位 30/33 等)と PR #85/86 / PR #94/95 に関連する Tier3 エントリを削除し、表の行番号・順序を整合。cli-pr-monitor の未解決メモ(termination root cause)記載を削除。
新規タスクの追加
docs/todo.md, docs/todo5.md
PR #110(Bundle d)に関連する新規タスクを追加:no-ephemeral-todo-reference の self-exclusion invariant を担保する単体テスト(順位 68)と、yaml/yml 拡張理由を .claude/custom-lint-rules.toml のコメントに明記するタスク(順位 69)。テスト対象ケース・完了基準・設置候補を具体化。
本文記載の更新
docs/todo.md, docs/docs-pr-iteration-efficiency.md
Bundle U/V/e の完了明記、Bundle e の convention 7項目の codify 先追記、Bundle d の採用 findings(順位 68/69 を含む)と残タスク方針を追記。machine + guideline の二層防御を期待効果として明記。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • aloekun/claude-code-hook-test#110: PR #110 の no-ephemeral-todo-reference ルールと関連実装に紐づく todo/ticket 追加を反映する更新。
  • aloekun/claude-code-hook-test#85: cli-pr-monitor 統合テストや Tier3 グローバル明文化エントリに関する変更を本 PR が完了扱いで削除しているため関連。
  • aloekun/claude-code-hook-test#108: docs/docs-pr-iteration-efficiency.md の編集とバンドル状態に関わる更新を共有しているため関連。
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは Bundle e(convention long-tail)の7件のグローバルルール集約という、この PR の主要な変更を明確に要約しており、優先度番号も具体的に示されている。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/docs-pr-iteration-efficiency.md`:
- Line 49: Fix the mismatch between docs/docs-pr-iteration-efficiency.md and
~/.claude/CLAUDE.md: either update docs/docs-pr-iteration-efficiency.md (remove
or correct the claim on Line 49 and Line 92 that "Bundle e item 25" was codified
under "Personal Preferences > Code Style") or add the missing "Personal
Preferences > Code Style" section to ~/.claude/CLAUDE.md and include the
codified item 25 there; ensure the doc text and the actual CLAUDE.md content are
consistent and that references to "Bundle e (item 25)" appear only where the
target section actually exists.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 86e3dc92-271f-4c1a-8152-40d759e0d600

📥 Commits

Reviewing files that changed from the base of the PR and between 55ac15b and 96decf1.

📒 Files selected for processing (5)
  • docs/docs-pr-iteration-efficiency.md
  • docs/todo.md
  • docs/todo2.md
  • docs/todo3.md
  • docs/todo5.md
💤 Files with no reviewable changes (2)
  • docs/todo3.md
  • docs/todo2.md

Comment thread docs/docs-pr-iteration-efficiency.md Outdated
Resolved findings:
- [Critical] docs/docs-pr-iteration-efficiency.md:49 docs/docs-pr-iteration-efficiency.md の CLAUDE.md へのcodify 内容について記述と実ファイルの齟齬を修正してください
@aloekun
Copy link
Copy Markdown
Owner Author

aloekun commented May 4, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@aloekun aloekun merged commit 06faa31 into master May 4, 2026
1 check passed
@aloekun aloekun deleted the feat/bundle-e-convention-rules branch May 4, 2026 20:34
aloekun added a commit that referenced this pull request May 5, 2026
…ion-efficiency.md retire (PR #111 post-merge-feedback) (#112)

## Bundle f (PR #111 post-merge-feedback、4 件採用) + 順位 62 (Document Governance) + 計画書 retirement の 1 PR 集約 land

### 順位 62 (Document Governance、Effort XS、新規 global rule)

- 新規 ~/.claude/rules/common/docs-governance.md を作成
- 3 ルール codify:
  1. Document Lifecycle Classification (permanent / ephemeral)
  2. Cross-File Reference Lifecycle (再掲、coding-style.md と cross-link)
  3. Retirement 4-step workflow (migrate value → migrate tasks → update refs → delete file)
- 本 PR 自身が retirement workflow の dogfood (docs/docs-pr-iteration-efficiency.md retire = 第一実例)

### 順位 71 (codification claims 検証手順、Effort XS)

- ~/.claude/rules/common/coding-style.md の Cross-File Reference Lifecycle に新 sub-section ### Codification claims の検証手順 追加
- 「file X の section Y に codified」と書く前に grep で実在確認、階層表現 > は ambiguous なため避ける
- PR #111 自己違反事例を実例引用 (Personal Preferences > Code Style 拡張 → CodeRabbit Critical 指摘)

### 順位 72 + 73 (ADR-033 拡張、Effort XS×2、同一新セクション内)

- docs/adr/adr-033-todo-numbering-simplification.md に新セクション ## priority table 運用ルール 追加
- 順位 72: 「依存」列の二層追跡 (technical 依存 vs strategic 順序)、順位 10 broken-link を実例引用
- 順位 73: Bundle 分割時の land 期限明記ルール、Bundle U/V/d を過去事例として引用
- 本 PR 自身が順位 73 の dogfood (Bundle f 分割推奨を統合実行した判断記録は commit message + PR body に残す)

### 順位 74 (ADR-030 拡張、Effort XS)

- docs/adr/adr-030-deterministic-post-merge-feedback.md の 入力源 / 出力 直後に新セクション ### Global rules editing の追跡 追加
- global rules (~/.claude/rules/, ~/.claude/CLAUDE.md, ~/.claude/skills/) の編集は VCS 管理外、transcript 経由で post-merge-feedback が捕捉
- PR #111 を実例引用 (5 ファイル global edit + project diff 0 行 + post-merge-feedback で全件 visible)
- pre-merge 補完層として coding-style.md (順位 71) と docs-governance.md (順位 62) を cross-link

### Retirement (docs/docs-pr-iteration-efficiency.md 削除)

- bundle 全消化 (Bundle docs-PR-streamline / docs-quality-pre-write / e で 12 件 land、残 順位 10 は priority table で継続追跡) で本ファイルが自己宣言した end condition 成立
- ADR-035 + global rules + lint rule + priority table 脚注で永続価値が全て分散保存済 → 新規 ADR 作成は不要
- 参照解除: docs/coderabbit-monitoring-efficiency.md:117 のリンクを ADR-035 リンクに置換

### Cleanup

- docs/todo5.md: 順位 62/71/72/73/74 の 5 詳細エントリ削除
- docs/todo.md: priority table から 5 行削除 + Bundle f 脚注を全 4 件 land + retirement 完了に更新

## Sub-PR 分割可否の dogfood 結果 (順位 73 への self-feedback)

順位 73 が codify した「Bundle 分割時の land 期限明記」ルールを本 PR の作業計画段階で適用検討した。結果、以下の理由で **統合 1 PR を選択**:

- ファイル削除 + 順位 62 (新規 global rule) + Bundle f 4 件 が全て docs-PR governance 領域で scope が完全重複
- retirement が global rule (順位 62) の dogfood として最も価値が高く、両者を分離すると意味的連続性が壊れる
- 5 ファイル touch は review 容易性を著しく下げるほどではない

順位 73 ルールは「分割時に期限を書く」を default としているが、本 PR のように統合に強い意味的根拠がある場合は統合を許容する。判断プロセス自体が今後の Bundle 運用への参照記録となる。

## 期待効果 (検証は dogfood)

- 計画書 ephemeral lifecycle が global rule (順位 62) で codify され、再発時の判断ぶれ消滅
- Cross-File Reference Lifecycle の self-application 強化で PR description / commit message での codification claim が事前検証される
- priority table 運用の二層追跡 + 期限管理が ADR-033 で formalize、長期滞留 detection
- global rules 編集の transparency が ADR-030 で formalize、post-merge-feedback による事後検証経路が明示化
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant